Skip to content

Conversation

HighW4y2H3ll
Copy link
Member

Adding llvm-ir2vec, llvm-ctxprof-util (and llvm-sim) in the Bazel configs. llvm-ctxprof-util and llvm-ir2vec are used in several LIT unit tests, and the missing binary is causing unit test failures.

llvm-ctxprof-util:

; RUN: llvm-ctxprof-util fromYAML --input %t/profile.yaml --output %t/profile.ctxprofdata

llvm-ir2vec:

self.ir2vec_binary = os.path.join(llvm_build_dir, "bin", "llvm-ir2vec")

@llvmbot llvmbot added the bazel "Peripheral" support tier build system: utils/bazel label Oct 13, 2025

cc_binary(
name = "llvm-sim",
testonly = True,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these tools really just for tests? They seem more like general purpose utils, which happen to be useful for tests.

OTOH, there's not too much harm in marking this testonly. I'd be fine adding them like this and then removing the testonly attr later if we need to use it outside of a testing context.

Copy link
Member Author

@HighW4y2H3ll HighW4y2H3ll Oct 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! llvm-sim is added because it's configured in the lit.cfg.py:

"llvm-sim",
The lit is throwing out a warning if the binary does not exists. :)


cc_binary(
name = "llvm-ctxprof-util",
testonly = True,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The commit description in a737b87 explicitly describes this as a test tool, so this one is definitely OK.

@HighW4y2H3ll HighW4y2H3ll merged commit 7e1f79c into llvm:main Oct 20, 2025
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bazel "Peripheral" support tier build system: utils/bazel

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants